package com.ramnight.unify.boot.redis;

import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.redis.connection.RedisConnectionFactory;

@Configuration
public class UnifyRedisConfiguration {
	@Bean
	@ConditionalOnProperty("spring.redis.host")
	public UnifyRedisTemplate redis(RedisConnectionFactory connectionFactory) {
		return new UnifyRedisTemplate(connectionFactory);
	}
}
